import React, { Component } from 'react';
import './index.scss';
class Alert extends Component {
    state = { visible: false };


    render() {
        return (

            <div>
                {this.props.isOpen ? <div className="alert_dialog_tab">
                    <div className="border alert_dialog_wrapper" id="alert_dialog_wrapper" >
                        <div className="alert_close_btn" onClick={() => {  this.props.noCancel?this.props.chooseFn(true):this.props.chooseFn(false) }}></div>
                        <div className="alert_dialog_content ">
                            <div className={  this.props.isConfirm?"left-icon btn-confirm": "left-icon btn-query" }></div>
                            <div className="alert_dialog_msg btn-query">{this.props.message}</div>
                        </div>
                        <div className="alert_dialog_footer">
                            <i onClick={() => { this.props.chooseFn('true') }}>确定</i>
                            {
                                this.props.noCancel?null:<i onClick={() => { this.props.chooseFn(false) }}>取消</i>
                            }
                        </div>
                    </div>
                </div> : ''}
            </div>

        )

    }

}
export default Alert;